<?php
require_once ('php/api/yelp_api_handler.php');
$term=urlencode($_GET["term"]);
$location=urlencode($_GET["location"]);
$yelp = new YelpAPIHandler($term,$location);
$yelp->connect();
$yelp_response = $yelp->response;
//var_dump($response);
foreach ($yelp_response->businesses as $business) {
    printf("<img src='".$business->image_url."' alt='Place'/><br/>".
            "<a href='".$business->url."'>".$business->name."</a><img src='".$business->rating_img_url_small."' alt='".$business->rating."'Place'/><br/>".
            $business->phone."<br/>");
}
?>
